


import videojs from 'video.js';
import type Player from 'video.js/dist/types/player';

export function useVideo(videoPlayer:Ref<HTMLVideoElement|null>,options:any){
  if(!videoPlayer.value) return null;
  const video =  videojs(videoPlayer.value as HTMLVideoElement,options,);
  // const player = useState('player',()=> video as Player)
  const player = ref(video as Player)
  return player
}
